/**
 * Copyright (c) 2006
 *      OpenAVS Developers. All Rights Reserved.
 *
 * Copyright (c) 2005-2006
 *      NSCC. All Rights Reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

#ifndef _BLOCK_H_
#define _BLOCK_H_
#include "define.h"

void inv_transform_B8(AVS_SHORT * psBlock);
void GetBlock(
		MOTIONVECTOR * pMv, 
		AVS_INT iImgX, AVS_INT iImgY, 
		AVS_INT iImgWidth, AVS_INT iImgHeight, 
		const AVS_BYTE * pbRefY, AVS_BYTE * pPred);
void GetChromaBlock16x16(
		const AVS_BYTE * pbRefUV, 
		AVS_INT iUVx, AVS_INT iUVy, 
		AVS_INT iUVWidth, AVS_INT iUVHeight, 
		MOTIONVECTOR * pMv, AVS_BYTE * pPred);
void GetChromaBlock16x8(
		const AVS_BYTE * pbRefUV, 
		AVS_INT iUVx, AVS_INT iUVy, 
		AVS_INT iUVWidth, AVS_INT iUVHeight, 
		MOTIONVECTOR * pMv, AVS_BYTE * pPred);
void GetChromaBlock8x16(
		const AVS_BYTE * pbRefUV, 
		AVS_INT iUVx, AVS_INT iUVy, 
		AVS_INT iUVWidth, AVS_INT iUVHeight, 
		MOTIONVECTOR * pMv, AVS_BYTE * pPred);
void GetChromaBlock8x8(
		const AVS_BYTE * pbRefUV, 
		AVS_INT iUVx, AVS_INT iUVy, 
		AVS_INT iUVWidth, AVS_INT iUVHeight, 
		MOTIONVECTOR * pMv, AVS_BYTE * pPred);

void ReconB8(
		AVS_BYTE * pDst,
		AVS_INT iImgWidth, 
		AVS_BYTE* pPred, 
		AVS_SHORT* pCoef);
void CopyB8(
		AVS_BYTE * pDst, 
		AVS_INT iStride, 
		AVS_BYTE * pSrc);
void AverageB8x(
		AVS_BYTE * pDst, 
		AVS_BYTE * pSrc, 
		AVS_INT iHeight, AVS_INT iWidth);

#endif
